<?php
namespace app\admin\controller;

class Article extends Base
{
    public function table()
    {
        return $this->view->fetch();
    }

    public function tableHandle()
    {
        $pm = $this->params;
        $result = $this->logic()->article()->getTables($pm);
        return json_print($result,'', $this->returnStyle);
    }

    public function add()
    {
        return $this->fetch();
    }

    public function addHandle()
    {
        $pm = $this->params;
        $rt = $this->logic()->article()->add($pm);
        return json_print($rt);
    }

    public function detail()
    {
        $info = $this->logic()->article()->detail($this->params);
        return json_print($info);
    }

    public function edit()
    {
        return $this->fetch();
    }

    public function editHandle()
    {
        $pm = $this->params;
        $rt = $this->logic()->article()->edit($pm);
        return json_print($rt);
    }

    public function deleteHandle()
    {
        $rt = $this->logic()->article()->del($this->params);
        return json_print($rt);
    }

}